<?php if(is_array($this->autos) && !empty($this->autos)) :?>
<div class="latest-car corner-all" style="background: none;">
    <div class="sidebar-caption">Похожие объявления</div>
    <ul class="left-car-list">
        <?php foreach ($this->autos as $auto):?>
            <?php
                $photo = $auto['mainPhotoUrl'];
                if(!$photo) {
                    $photo = 'images/nophoto/'.$auto['categoryId'].'l.jpg';
                } else {
                    $photo = $this->getImage($photo);
                }
            ?>
            <li>
                <a href="<?= $this->url_Auto($auto['id'], $auto['mark']['name'], $auto['model']['name']) ?>" style="position: relative;">
                    <img width="65" height="49" src="<?= $photo ?>" alt="Фото <?= $auto['mark']['name']." ".$auto['model']['name']?>" />
                    <span class="model-year"><?= $auto['mark']['name']." ".$auto['model']['name']?><?= ($auto['years'])?' '.$auto['years']:'';?></span>
                    <span class="price"><?= $this->formatCurrency($auto['price'], $auto['currencyId']);?></span>
                    <span class="city"><?= $auto['city']['name']?></span>
                    <em></em>
                </a>
            </li>

        <?php endforeach;?>
    </ul>
</div>
<?php endif; ?>
